namespace HeroldIT.Dnn.Modules.News.SqlProvider
{
    public static partial class TranslateNewsEntryDetail
    {
        static partial void ToBusiness(this NewsEntryDetail from, HeroldIT.Dnn.Modules.News.NewsEntryDetail to);

        public static HeroldIT.Dnn.Modules.News.NewsEntryDetail ToBusiness(this NewsEntryDetail from)
        {
            if (null == from) return null;
            var to = new HeroldIT.Dnn.Modules.News.NewsEntryDetail
            {
                NewsEntryDetailId = from.NewsEntryDetailId,
                NewsEntryId = from.NewsEntryId,
                Locale = from.Locale,
                Headline = from.Headline,
                Subline = from.Subline,
                TeaserText = from.TeaserText,
                TeaserImageUrl = from.TeaserImageUrl,
                DetailText = from.DetailText,
                DetailImageUrl = from.DetailImageUrl,
                DetailUrl = from.DetailUrl,
                Source = from.Source,
                IsHidden = from.IsHidden,
                IsDefaultLocale = from.IsDefaultLocale,
                TeaserImageCaption = from.TeaserImageCaption,
                DetailImageCaption = from.DetailImageCaption,
                UseDetailImageForTeaser = from.UseDetailImageForTeaser,
                TeaserImageUrl2 = from.TeaserImageUrl2,
                TeaserImageCaption2 = from.TeaserImageCaption2,
                DetailImageUrl2 = from.DetailImageUrl2,
                DetailImageCaption2 = from.DetailImageCaption2,
                TeaserImageUrl3 = from.TeaserImageUrl3,
                TeaserImageCaption3 = from.TeaserImageCaption3,
                DetailImageUrl3 = from.DetailImageUrl3,
                DetailImageCaption3 = from.DetailImageCaption3,
                TeaserImageUrl4 = from.TeaserImageUrl4,
                TeaserImageCaption4 = from.TeaserImageCaption4,
                DetailImageUrl4 = from.DetailImageUrl4,
                DetailImageCaption4 = from.DetailImageCaption4,
            };
            from.ToBusiness(to);
            return to;
        }

        static partial void ToLinq(this HeroldIT.Dnn.Modules.News.NewsEntryDetail from, NewsEntryDetail to);

        public static NewsEntryDetail ToLinq(this HeroldIT.Dnn.Modules.News.NewsEntryDetail from)
        {
            if (null == from) return null;
            var to = new NewsEntryDetail
            {
                NewsEntryDetailId = from.NewsEntryDetailId,
                NewsEntryId = from.NewsEntryId,
                Locale = from.Locale,
                Headline = from.Headline,
                Subline = from.Subline,
                TeaserText = from.TeaserText,
                TeaserImageUrl = from.TeaserImageUrl,
                DetailText = from.DetailText,
                DetailImageUrl = from.DetailImageUrl,
                DetailUrl = from.DetailUrl,
                Source = from.Source,
                IsHidden = from.IsHidden,
                IsDefaultLocale = from.IsDefaultLocale,
                TeaserImageCaption = from.TeaserImageCaption,
                DetailImageCaption = from.DetailImageCaption,
                UseDetailImageForTeaser = from.UseDetailImageForTeaser,
                TeaserImageUrl2 = from.TeaserImageUrl2,
                TeaserImageCaption2 = from.TeaserImageCaption2,
                DetailImageUrl2 = from.DetailImageUrl2,
                DetailImageCaption2 = from.DetailImageCaption2,
                TeaserImageUrl3 = from.TeaserImageUrl3,
                TeaserImageCaption3 = from.TeaserImageCaption3,
                DetailImageUrl3 = from.DetailImageUrl3,
                DetailImageCaption3 = from.DetailImageCaption3,
                TeaserImageUrl4 = from.TeaserImageUrl4,
                TeaserImageCaption4 = from.TeaserImageCaption4,
                DetailImageUrl4 = from.DetailImageUrl4,
                DetailImageCaption4 = from.DetailImageCaption4,
            };
            from.ToLinq(to);
            return to;
        }
    }
}

